<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />





  <link rel="alternate" href="/atom.xml" title="yampery" type="application/atom+xml" />






<meta name="description" content="性能测试 测试目标1. 绑定接口性能：响应时长，并发量 2. 历史表500w数据下事务的处理情况 3. 压测过程线程状态 4. 压测过程堆状态 当前状态1. 号池总量：1000000 2. T_REGINFO总量：20006 3. T_REGINFOHIS总量：4884369 测试服务器系统版本Linux testserver-centos 3.10.0-693.21.1.el7.x86_64 #">
<meta property="og:type" content="article">
<meta property="og:title" content="性能测试">
<meta property="og:url" content="https://yampery.gitee.io/2019/02/25/ykt_test_binding/index.html">
<meta property="og:site_name" content="yampery">
<meta property="og:description" content="性能测试 测试目标1. 绑定接口性能：响应时长，并发量 2. 历史表500w数据下事务的处理情况 3. 压测过程线程状态 4. 压测过程堆状态 当前状态1. 号池总量：1000000 2. T_REGINFO总量：20006 3. T_REGINFOHIS总量：4884369 测试服务器系统版本Linux testserver-centos 3.10.0-693.21.1.el7.x86_64 #">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://i.imgur.com/dS29AV5.png">
<meta property="og:image" content="https://i.imgur.com/eJTZ9u2.png">
<meta property="og:image" content="https://i.imgur.com/2k9DUsY.png">
<meta property="og:image" content="https://i.imgur.com/29x2Idw.png">
<meta property="og:image" content="https://i.imgur.com/4vLS2uA.png">
<meta property="og:image" content="https://i.imgur.com/ZMkoGuB.png">
<meta property="og:updated_time" content="2018-04-28T09:57:05.781Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="性能测试">
<meta name="twitter:description" content="性能测试 测试目标1. 绑定接口性能：响应时长，并发量 2. 历史表500w数据下事务的处理情况 3. 压测过程线程状态 4. 压测过程堆状态 当前状态1. 号池总量：1000000 2. T_REGINFO总量：20006 3. T_REGINFOHIS总量：4884369 测试服务器系统版本Linux testserver-centos 3.10.0-693.21.1.el7.x86_64 #">
<meta name="twitter:image" content="https://i.imgur.com/dS29AV5.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://yampery.gitee.io/2019/02/25/ykt_test_binding/"/>





  <title>性能测试 | yampery</title>
  








  <link href='//fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">yampery</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">天尽头，回眸望红尘</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://yampery.gitee.io/2019/02/25/ykt_test_binding/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="yampery">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="yampery">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">性能测试</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-02-25T11:05:38+08:00">
                2019-02-25
              </time>
            

            

            
          </span>

          

          
            
          

          
          
             <span id="/2019/02/25/ykt_test_binding/" class="leancloud_visitors" data-flag-title="性能测试">
               <span class="post-meta-divider">|</span>
               <span class="post-meta-item-icon">
                 <i class="fa fa-eye"></i>
               </span>
               
                 <span class="post-meta-item-text">阅读次数&#58;</span>
               
                 <span class="leancloud-visitors-count"></span>
             </span>
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1.2k 字
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  6 分钟
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="性能测试"><a href="#性能测试" class="headerlink" title="性能测试"></a>性能测试</h1><hr>
<h2 id="测试目标"><a href="#测试目标" class="headerlink" title="测试目标"></a>测试目标</h2><pre><code>1. 绑定接口性能：响应时长，并发量
2. 历史表500w数据下事务的处理情况
3. 压测过程线程状态
4. 压测过程堆状态
</code></pre><h2 id="当前状态"><a href="#当前状态" class="headerlink" title="当前状态"></a>当前状态</h2><pre><code>1. 号池总量：1000000
2. T_REGINFO总量：20006
3. T_REGINFOHIS总量：4884369
</code></pre><h2 id="测试服务器"><a href="#测试服务器" class="headerlink" title="测试服务器"></a>测试服务器</h2><h3 id="系统版本"><a href="#系统版本" class="headerlink" title="系统版本"></a>系统版本</h3><pre><code>Linux testserver-centos 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
</code></pre><h3 id="CPU信息"><a href="#CPU信息" class="headerlink" title="CPU信息"></a>CPU信息</h3><pre><code>Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz    X32
</code></pre><h3 id="内存信息"><a href="#内存信息" class="headerlink" title="内存信息"></a>内存信息</h3><pre><code>MemTotal:       16215504 kB
MemFree:         5705052 kB
MemAvailable:   10554240 kB
Buffers:              28 kB
Cached:          5565036 kB
SwapCached:       518972 kB
Active:          5504676 kB
Inactive:        4168584 kB
Active(anon):    2818640 kB
Inactive(anon):  2020616 kB
Active(file):    2686036 kB
Inactive(file):  2147968 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       8126460 kB
SwapFree:        6607556 kB
Dirty:                84 kB
Writeback:             0 kB
AnonPages:       3626044 kB
Mapped:           218624 kB
Shmem:            731060 kB
Slab:             564724 kB
SReclaimable:     410288 kB
SUnreclaim:       154436 kB
KernelStack:       12608 kB
PageTables:        77320 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    16234212 kB
Committed_AS:    7857184 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      316296 kB
VmallocChunk:   34350563324 kB
HardwareCorrupted:     0 kB
AnonHugePages:    110592 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      363456 kB
DirectMap2M:    14270464 kB
DirectMap1G:     2097152 kB
</code></pre><h2 id="数据服务器"><a href="#数据服务器" class="headerlink" title="数据服务器"></a>数据服务器</h2><h3 id="系统版本-1"><a href="#系统版本-1" class="headerlink" title="系统版本"></a>系统版本</h3><pre><code>Linux weihua2 2.6.32-573.18.1.el6.i686 #1 SMP Tue Feb 9 19:51:22 UTC 2016 i686 i686 i386 GNU/Linux
</code></pre><h3 id="CPU信息-1"><a href="#CPU信息-1" class="headerlink" title="CPU信息"></a>CPU信息</h3><pre><code>Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz     X32
</code></pre><h3 id="内存信息-1"><a href="#内存信息-1" class="headerlink" title="内存信息"></a>内存信息</h3><pre><code>MemTotal:        8130136 kB
MemFree:         2471888 kB
Buffers:          347776 kB
Cached:           604844 kB
SwapCached:        28720 kB
Active:          4093188 kB
Inactive:        1380972 kB
Active(anon):    3596772 kB
Inactive(anon):   926380 kB
Active(file):     496416 kB
Inactive(file):   454592 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:       7435208 kB
HighFree:        2288728 kB
LowTotal:         694928 kB
LowFree:          183160 kB
SwapTotal:       8273916 kB
SwapFree:        8214956 kB
Dirty:                28 kB
Writeback:             0 kB
AnonPages:       4493096 kB
Mapped:            33680 kB
Shmem:              1540 kB
Slab:             102100 kB
SReclaimable:      78500 kB
SUnreclaim:        23600 kB
KernelStack:        7672 kB
PageTables:        14536 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    12338984 kB
Committed_AS:    5936384 kB
VmallocTotal:     122880 kB
VmallocUsed:        7400 kB
VmallocChunk:      35868 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       10232 kB
DirectMap2M:      897024 kB
</code></pre><h2 id="负载机"><a href="#负载机" class="headerlink" title="负载机"></a>负载机</h2><h3 id="系统版本-2"><a href="#系统版本-2" class="headerlink" title="系统版本"></a>系统版本</h3><pre><code>Linux weihua1 2.6.32-279.el6.i686 #1 SMP Fri Jun 22 10:59:55 UTC 2012 i686 i686 i386 GNU/Linux
</code></pre><h3 id="cpu信息"><a href="#cpu信息" class="headerlink" title="cpu信息"></a>cpu信息</h3><pre><code>Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz  X32
</code></pre><h3 id="内存信息-2"><a href="#内存信息-2" class="headerlink" title="内存信息"></a>内存信息</h3><pre><code>MemTotal:        8130520 kB
MemFree:         5369356 kB
Buffers:          256976 kB
Cached:          2222852 kB
SwapCached:         7724 kB
Active:          1667240 kB
Inactive:         853124 kB
Active(anon):      15696 kB
Inactive(anon):    26080 kB
Active(file):    1651544 kB
Inactive(file):   827044 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:       7435208 kB
HighFree:        5249168 kB
LowTotal:         695312 kB
LowFree:          120188 kB
SwapTotal:       8273912 kB
SwapFree:        8201640 kB
Dirty:              4080 kB
Writeback:             0 kB
AnonPages:         33944 kB
Mapped:            14192 kB
Shmem:              1240 kB
Slab:             150052 kB
SReclaimable:     130256 kB
SUnreclaim:        19796 kB
KernelStack:        6600 kB
PageTables:         5184 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    12339172 kB
Committed_AS:     588200 kB
VmallocTotal:     122880 kB
VmallocUsed:        7064 kB
VmallocChunk:      84064 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       10232 kB
DirectMap2M:      897024 kB
</code></pre><h2 id="测试准备"><a href="#测试准备" class="headerlink" title="测试准备"></a>测试准备</h2><pre><code>1. 测试工具：jmeter 4.0；
2. 测试数据：csv 100w；
3. 线程组：500并发，60秒增长时间，600秒持续时间。
</code></pre><h2 id="测试结果一"><a href="#测试结果一" class="headerlink" title="测试结果一"></a>测试结果一</h2><pre><code>未开启TIME_WAIT重用，FIN_WAIT_2状态时间为60
</code></pre><h3 id="聚合分析"><a href="#聚合分析" class="headerlink" title="聚合分析"></a>聚合分析</h3><p><img src="https://i.imgur.com/dS29AV5.png" alt="">
<img src="https://i.imgur.com/eJTZ9u2.png" alt=""></p>
<h3 id="响应时长"><a href="#响应时长" class="headerlink" title="响应时长"></a>响应时长</h3><p><img src="https://i.imgur.com/2k9DUsY.png" alt=""></p>
<h2 id="测试结果二"><a href="#测试结果二" class="headerlink" title="测试结果二"></a>测试结果二</h2><pre><code>开启TIME_WAIT重用，FIN_WAIT_2状态时间为30
</code></pre><h3 id="聚合分析-1"><a href="#聚合分析-1" class="headerlink" title="聚合分析"></a>聚合分析</h3><p><img src="https://i.imgur.com/29x2Idw.png" alt="">
<img src="https://i.imgur.com/4vLS2uA.png" alt=""></p>
<h3 id="响应时长-1"><a href="#响应时长-1" class="headerlink" title="响应时长"></a>响应时长</h3><p><img src="https://i.imgur.com/ZMkoGuB.png" alt=""></p>
<h1 id="数据库访问情况"><a href="#数据库访问情况" class="headerlink" title="数据库访问情况"></a>数据库访问情况</h1><hr>
<h3 id="T-REGINFOHIS表"><a href="#T-REGINFOHIS表" class="headerlink" title="T_REGINFOHIS表"></a>T_REGINFOHIS表</h3><ul>
<li>数据量：4884369</li>
<li><p>表结构</p>
<pre><code>CREATE TABLE `T_REGINFOHIS` (
  `hisid` bigint(16) NOT NULL AUTO_INCREMENT,
  `addtime` datetime DEFAULT NULL,
  `opuidtype` char(1) DEFAULT NULL,
  `uidnumber` varchar(16) DEFAULT NULL,
  `regphone` varchar(32) DEFAULT NULL,
  `subid` bigint(16) DEFAULT NULL,
  `regtime` datetime NOT NULL DEFAULT &apos;0000-00-00 00:00:00&apos;,
  `regmodule` varchar(16) DEFAULT NULL,
  `uidtype` varchar(8) DEFAULT NULL,
  `callrestrict` varchar(8) DEFAULT NULL,
  `callrecording` varchar(4) DEFAULT NULL,
  `anucode` varchar(64) DEFAULT NULL,
  `bnucode` varchar(64) DEFAULT NULL COMMENT &apos;被叫放音&apos;,
  `calldisplay` varchar(16) DEFAULT NULL,
  `productid` int(11) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `cardtype` varchar(32) DEFAULT NULL,
  `cardno` varchar(32) DEFAULT NULL,
  `calldisplaynouid` varchar(32) DEFAULT NULL,
  `unitid` varchar(64) DEFAULT NULL,
  `expiretime` datetime DEFAULT NULL,
  `logid` bigint(10) DEFAULT NULL,
  `uuidinpartner` varchar(64) DEFAULT NULL,
  `batchworkid` varchar(36) DEFAULT NULL,
  `opuser` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`hisid`,`regtime`),
  KEY `ind_uidnumber` (`uidnumber`),
  KEY `ind_regphone` (`regphone`),
  KEY `ind_uuidinpartner` (`uuidinpartner`)
) ENGINE=InnoDB AUTO_INCREMENT=5884370 DEFAULT CHARSET=utf8
</code></pre></li>
</ul>
<h3 id="T-REGINFO表"><a href="#T-REGINFO表" class="headerlink" title="T_REGINFO表"></a>T_REGINFO表</h3><ul>
<li>数据量：20006</li>
<li><p>表结构</p>
<pre><code>CREATE TABLE `T_REGINFO` (
  `uidnumber` varchar(16) DEFAULT NULL,
  `regphone` varchar(32) DEFAULT NULL,
  `subid` bigint(16) NOT NULL AUTO_INCREMENT,
  `regtime` datetime DEFAULT NULL,
  `regmodule` varchar(16) DEFAULT NULL,
  `uidtype` varchar(8) DEFAULT NULL,
  `callrestrict` varchar(8) DEFAULT NULL,
  `callrecording` varchar(4) DEFAULT NULL,
  `anucode` varchar(64) DEFAULT NULL,
  `bnucode` varchar(64) DEFAULT NULL COMMENT &apos;被叫放音&apos;,
  `calldisplay` varchar(16) DEFAULT NULL,
  `productid` int(11) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `cardtype` varchar(32) DEFAULT NULL,
  `cardno` varchar(32) DEFAULT NULL,
  `calldisplaynouid` varchar(16) DEFAULT NULL,
  `unitid` varchar(16) DEFAULT NULL,
  `expiretime` datetime DEFAULT NULL,
  `uuidinpartner` varchar(64) DEFAULT NULL,
  `batchworkid` varchar(36) DEFAULT &apos;&apos;,
  `opuser` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`subid`),
  KEY `ind_reginfo_batchworkid` (`batchworkid`) USING BTREE,
  KEY `ind_reginfo_uuidinpartner` (`uuidinpartner`) USING BTREE,
  KEY `ind_reginfo_uidnumber` (`uidnumber`),
  KEY `ind_reginfo_regphone` (`regphone`)
) ENGINE=InnoDB AUTO_INCREMENT=3452188 DEFAULT CHARSET=utf8;
</code></pre></li>
</ul>
<hr>
<h3 id="sql语句"><a href="#sql语句" class="headerlink" title="sql语句"></a>sql语句</h3><ul>
<li><p>写入T_REGINFOHIS</p>
<pre><code>INSERT INTO T_REGINFOHIS (hisid, addtime, opuidtype, uidnumber, regphone
, subid, regtime, regmodule, uidtype, callrestrict
, callrecording, anucode, bnucode, calldisplay, productid
, name, cardtype, cardno, calldisplaynouid, unitid
, expiretime, logid, uuidinpartner, batchworkid, opuser)
VALUES (?, now(), ?, ?, ?
, ?, ?, ?, ?, ?
, ?, ?, ?, ?, ?
, ?, ?, ?, ?, ?
, ?, ?, ?, ?, ?)
</code></pre></li>
<li><p>写入T_REGINFO</p>
<pre><code>INSERT INTO T_REGINFO (subid, uidnumber, regphone, regtime, regmodule
, uidtype, callrestrict, callrecording, anucode, bnucode
, calldisplay, productid, name, cardtype, cardno
, calldisplaynouid, unitid, expiretime, uuidinpartner, batchworkid
, opuser)
VALUES (?, ?, ?, ?, ?
, ?, ?, ?, ?, ?
, ?, ?, ?, ?, ?
, ?, ?, ?, ?, ?
, ?)
</code></pre></li>
</ul>
<hr>
<h3 id="sql统计结果"><a href="#sql统计结果" class="headerlink" title="sql统计结果"></a>sql统计结果</h3><table style="table-layout:auto">
    <tr>
        <td>用例</td>
        <td>执行数</td>
        <td>执行时间</td>
        <td>最慢</td>
        <td>时间分布</td>
        <td>平均时间</td>
    </tr>
    <tr>
        <td>写入T_REGINFOHIS</td>
        <td>1,000,000</td>
        <td>33,850,801</td>
        <td>8,945</td>
        <td>[310988,441162,157808,86465,3577,0,0,0]</td>
        <td>33.9</td>
    </tr>
    <tr>
        <td>写入T_REGINFO</td>
        <td>1,000,000</td>
        <td>37,210,288</td>
        <td>8,906</td>
        <td>[403461,337974,188582,64237,5746,0,0,0]</td>
        <td>37.2</td>
    </tr>
</table>
      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2019/02/25/docker_elk/" rel="next" title="基于docker搭建ELK系统">
                <i class="fa fa-chevron-left"></i> 基于docker搭建ELK系统
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2019/02/25/redis/rdsmq/" rel="prev" title="基于Redis的消息队列">
                基于Redis的消息队列 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">yampery</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">6</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            

            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/yampery" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:1yampery@gmail.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#性能测试"><span class="nav-number">1.</span> <span class="nav-text">性能测试</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#测试目标"><span class="nav-number">1.1.</span> <span class="nav-text">测试目标</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#当前状态"><span class="nav-number">1.2.</span> <span class="nav-text">当前状态</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#测试服务器"><span class="nav-number">1.3.</span> <span class="nav-text">测试服务器</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#系统版本"><span class="nav-number">1.3.1.</span> <span class="nav-text">系统版本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CPU信息"><span class="nav-number">1.3.2.</span> <span class="nav-text">CPU信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内存信息"><span class="nav-number">1.3.3.</span> <span class="nav-text">内存信息</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#数据服务器"><span class="nav-number">1.4.</span> <span class="nav-text">数据服务器</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#系统版本-1"><span class="nav-number">1.4.1.</span> <span class="nav-text">系统版本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CPU信息-1"><span class="nav-number">1.4.2.</span> <span class="nav-text">CPU信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内存信息-1"><span class="nav-number">1.4.3.</span> <span class="nav-text">内存信息</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#负载机"><span class="nav-number">1.5.</span> <span class="nav-text">负载机</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#系统版本-2"><span class="nav-number">1.5.1.</span> <span class="nav-text">系统版本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#cpu信息"><span class="nav-number">1.5.2.</span> <span class="nav-text">cpu信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内存信息-2"><span class="nav-number">1.5.3.</span> <span class="nav-text">内存信息</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#测试准备"><span class="nav-number">1.6.</span> <span class="nav-text">测试准备</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#测试结果一"><span class="nav-number">1.7.</span> <span class="nav-text">测试结果一</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#聚合分析"><span class="nav-number">1.7.1.</span> <span class="nav-text">聚合分析</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#响应时长"><span class="nav-number">1.7.2.</span> <span class="nav-text">响应时长</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#测试结果二"><span class="nav-number">1.8.</span> <span class="nav-text">测试结果二</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#聚合分析-1"><span class="nav-number">1.8.1.</span> <span class="nav-text">聚合分析</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#响应时长-1"><span class="nav-number">1.8.2.</span> <span class="nav-text">响应时长</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#数据库访问情况"><span class="nav-number">2.</span> <span class="nav-text">数据库访问情况</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#T-REGINFOHIS表"><span class="nav-number">2.0.1.</span> <span class="nav-text">T_REGINFOHIS表</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#T-REGINFO表"><span class="nav-number">2.0.2.</span> <span class="nav-text">T_REGINFO表</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#sql语句"><span class="nav-number">2.0.3.</span> <span class="nav-text">sql语句</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#sql统计结果"><span class="nav-number">2.0.4.</span> <span class="nav-text">sql统计结果</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2018 &mdash; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">yampery</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io" rel="external nofollow">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next" rel="external nofollow">NexT.Mist</a> v5.1.4</div>




        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      <i class="fa fa-user"></i> 本站访客数
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人次
    </span>
  

  
    <span class="site-pv">
      <i class="fa fa-eye"></i> 本站总访问量
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
  <script>AV.initialize("35rGUMRzp5wPN2jmmIUWeBNh-gzGzoHsz", "fmF6mJDmgl0FkqBKX8I2HiGF");</script>
  <script>
    function showTime(Counter) {
      var query = new AV.Query(Counter);
      var entries = [];
      var $visitors = $(".leancloud_visitors");

      $visitors.each(function () {
        entries.push( $(this).attr("id").trim() );
      });

      query.containedIn('url', entries);
      query.find()
        .done(function (results) {
          var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

          if (results.length === 0) {
            $visitors.find(COUNT_CONTAINER_REF).text(0);
            return;
          }

          for (var i = 0; i < results.length; i++) {
            var item = results[i];
            var url = item.get('url');
            var time = item.get('time');
            var element = document.getElementById(url);

            $(element).find(COUNT_CONTAINER_REF).text(time);
          }
          for(var i = 0; i < entries.length; i++) {
            var url = entries[i];
            var element = document.getElementById(url);
            var countSpan = $(element).find(COUNT_CONTAINER_REF);
            if( countSpan.text() == '') {
              countSpan.text(0);
            }
          }
        })
        .fail(function (object, error) {
          console.log("Error: " + error.code + " " + error.message);
        });
    }

    function addCount(Counter) {
      var $visitors = $(".leancloud_visitors");
      var url = $visitors.attr('id').trim();
      var title = $visitors.attr('data-flag-title').trim();
      var query = new AV.Query(Counter);

      query.equalTo("url", url);
      query.find({
        success: function(results) {
          if (results.length > 0) {
            var counter = results[0];
            counter.fetchWhenSave(true);
            counter.increment("time");
            counter.save(null, {
              success: function(counter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(counter.get('time'));
              },
              error: function(counter, error) {
                console.log('Failed to save Visitor num, with error message: ' + error.message);
              }
            });
          } else {
            var newcounter = new Counter();
            /* Set ACL */
            var acl = new AV.ACL();
            acl.setPublicReadAccess(true);
            acl.setPublicWriteAccess(true);
            newcounter.setACL(acl);
            /* End Set ACL */
            newcounter.set("title", title);
            newcounter.set("url", url);
            newcounter.set("time", 1);
            newcounter.save(null, {
              success: function(newcounter) {
                var $element = $(document.getElementById(url));
                $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
              },
              error: function(newcounter, error) {
                console.log('Failed to create');
              }
            });
          }
        },
        error: function(error) {
          console.log('Error:' + error.code + " " + error.message);
        }
      });
    }

    $(function() {
      var Counter = AV.Object.extend("Counter");
      if ($('.leancloud_visitors').length == 1) {
        addCount(Counter);
      } else if ($('.post-title-link').length > 1) {
        showTime(Counter);
      }
    });
  </script>



  

  

  
  

  

  

  

</body>
</html>
